Integrand size = 20, antiderivative size = 152 \[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\frac {i (c+d x)^3}{a f}+\frac {(c+d x)^4}{4 a d}-\frac {6 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a f^2}+\frac {12 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a f^3}-\frac {12 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a f^4}-\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f} \]
I*(d*x+c)^3/a/f+1/4*(d*x+c)^4/a/d-6*d*(d*x+c)^2*ln(1+exp(I*(f*x+e)))/a/f^2 +12*I*d^2*(d*x+c)*polylog(2,-exp(I*(f*x+e)))/a/f^3-12*d^3*polylog(3,-exp(I *(f*x+e)))/a/f^4-(d*x+c)^3*tan(1/2*f*x+1/2*e)/a/f
Time = 2.11 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.42 \[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\frac {\cos \left (\frac {1}{2} (e+f x)\right ) \sec (e+f x) \left (x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right ) \cos \left (\frac {1}{2} (e+f x)\right )+\frac {8 \cos \left (\frac {1}{2} (e+f x)\right ) \left (-\frac {i f^3 (c+d x)^3}{1+e^{i e}}-3 d f^2 (c+d x)^2 \log \left (1+e^{-i (e+f x)}\right )-6 i d^2 f (c+d x) \operatorname {PolyLog}\left (2,-e^{-i (e+f x)}\right )-6 d^3 \operatorname {PolyLog}\left (3,-e^{-i (e+f x)}\right )\right )}{f^4}-\frac {4 (c+d x)^3 \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right )}{f}\right )}{2 a (1+\sec (e+f x))} \]
(Cos[(e + f*x)/2]*Sec[e + f*x]*(x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x ^3)*Cos[(e + f*x)/2] + (8*Cos[(e + f*x)/2]*(((-I)*f^3*(c + d*x)^3)/(1 + E^ (I*e)) - 3*d*f^2*(c + d*x)^2*Log[1 + E^((-I)*(e + f*x))] - (6*I)*d^2*f*(c + d*x)*PolyLog[2, -E^((-I)*(e + f*x))] - 6*d^3*PolyLog[3, -E^((-I)*(e + f* x))]))/f^4 - (4*(c + d*x)^3*Sec[e/2]*Sin[(f*x)/2])/f))/(2*a*(1 + Sec[e + f *x]))
Time = 0.54 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 4679, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(c+d x)^3}{a \sec (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d x)^3}{a \csc \left (e+f x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4679 |
\(\displaystyle \int \left (\frac {(c+d x)^3}{a}-\frac {(c+d x)^3}{a \cos (e+f x)+a}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {12 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a f^3}-\frac {6 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a f^2}-\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}+\frac {i (c+d x)^3}{a f}+\frac {(c+d x)^4}{4 a d}-\frac {12 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a f^4}\) |
(I*(c + d*x)^3)/(a*f) + (c + d*x)^4/(4*a*d) - (6*d*(c + d*x)^2*Log[1 + E^( I*(e + f*x))])/(a*f^2) + ((12*I)*d^2*(c + d*x)*PolyLog[2, -E^(I*(e + f*x)) ])/(a*f^3) - (12*d^3*PolyLog[3, -E^(I*(e + f*x))])/(a*f^4) - ((c + d*x)^3* Tan[e/2 + (f*x)/2])/(a*f)
3.1.11.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt Q[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 416 vs. \(2 (138 ) = 276\).
Time = 0.55 (sec) , antiderivative size = 417, normalized size of antiderivative = 2.74
method | result | size |
risch | \(\frac {d^{3} x^{4}}{4 a}+\frac {d^{2} c \,x^{3}}{a}+\frac {3 d \,c^{2} x^{2}}{2 a}+\frac {c^{3} x}{a}+\frac {c^{4}}{4 a d}+\frac {12 i d^{2} c \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right )}{a \,f^{3}}-\frac {2 i \left (d^{3} x^{3}+3 c \,d^{2} x^{2}+3 c^{2} d x +c^{3}\right )}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}+\frac {6 d^{3} e^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a \,f^{4}}-\frac {6 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x^{2}}{a \,f^{2}}-\frac {12 d^{3} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (f x +e \right )}\right )}{a \,f^{4}}+\frac {6 d \,c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a \,f^{2}}-\frac {6 d \,c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{a \,f^{2}}+\frac {2 i d^{3} x^{3}}{a f}-\frac {12 d^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x}{a \,f^{2}}-\frac {4 i d^{3} e^{3}}{a \,f^{4}}+\frac {6 i d^{2} c \,x^{2}}{a f}-\frac {6 i d^{3} e^{2} x}{a \,f^{3}}+\frac {12 i d^{3} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right ) x}{a \,f^{3}}+\frac {6 i d^{2} c \,e^{2}}{a \,f^{3}}+\frac {12 i d^{2} c e x}{a \,f^{2}}-\frac {12 d^{2} e c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a \,f^{3}}\) | \(417\) |
1/4/a*d^3*x^4+1/a*d^2*c*x^3+3/2/a*d*c^2*x^2+1/a*c^3*x+1/4/a/d*c^4+12*I/a/f ^3*d^2*c*polylog(2,-exp(I*(f*x+e)))-2*I*(d^3*x^3+3*c*d^2*x^2+3*c^2*d*x+c^3 )/f/a/(exp(I*(f*x+e))+1)+6/a/f^4*d^3*e^2*ln(exp(I*(f*x+e)))-6/a/f^2*d^3*ln (exp(I*(f*x+e))+1)*x^2-12*d^3*polylog(3,-exp(I*(f*x+e)))/a/f^4+6/a/f^2*d*c ^2*ln(exp(I*(f*x+e)))-6/a/f^2*d*c^2*ln(exp(I*(f*x+e))+1)+2*I/a/f*d^3*x^3-1 2/a/f^2*d^2*c*ln(exp(I*(f*x+e))+1)*x-4*I/a/f^4*d^3*e^3+6*I/a/f*d^2*c*x^2-6 *I/a/f^3*d^3*e^2*x+12*I/a/f^3*d^3*polylog(2,-exp(I*(f*x+e)))*x+6*I/a/f^3*d ^2*c*e^2+12*I/a/f^2*d^2*c*e*x-12/a/f^3*d^2*e*c*ln(exp(I*(f*x+e)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 516 vs. \(2 (135) = 270\).
Time = 0.30 (sec) , antiderivative size = 516, normalized size of antiderivative = 3.39 \[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\frac {d^{3} f^{4} x^{4} + 4 \, c d^{2} f^{4} x^{3} + 6 \, c^{2} d f^{4} x^{2} + 4 \, c^{3} f^{4} x + {\left (d^{3} f^{4} x^{4} + 4 \, c d^{2} f^{4} x^{3} + 6 \, c^{2} d f^{4} x^{2} + 4 \, c^{3} f^{4} x\right )} \cos \left (f x + e\right ) - 24 \, {\left (i \, d^{3} f x + i \, c d^{2} f + {\left (i \, d^{3} f x + i \, c d^{2} f\right )} \cos \left (f x + e\right )\right )} {\rm Li}_2\left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right ) - 24 \, {\left (-i \, d^{3} f x - i \, c d^{2} f + {\left (-i \, d^{3} f x - i \, c d^{2} f\right )} \cos \left (f x + e\right )\right )} {\rm Li}_2\left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right ) - 12 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2}\right )} \cos \left (f x + e\right )\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + 1\right ) - 12 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2}\right )} \cos \left (f x + e\right )\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + 1\right ) - 24 \, {\left (d^{3} \cos \left (f x + e\right ) + d^{3}\right )} {\rm polylog}\left (3, -\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right ) - 24 \, {\left (d^{3} \cos \left (f x + e\right ) + d^{3}\right )} {\rm polylog}\left (3, -\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right ) - 4 \, {\left (d^{3} f^{3} x^{3} + 3 \, c d^{2} f^{3} x^{2} + 3 \, c^{2} d f^{3} x + c^{3} f^{3}\right )} \sin \left (f x + e\right )}{4 \, {\left (a f^{4} \cos \left (f x + e\right ) + a f^{4}\right )}} \]
1/4*(d^3*f^4*x^4 + 4*c*d^2*f^4*x^3 + 6*c^2*d*f^4*x^2 + 4*c^3*f^4*x + (d^3* f^4*x^4 + 4*c*d^2*f^4*x^3 + 6*c^2*d*f^4*x^2 + 4*c^3*f^4*x)*cos(f*x + e) - 24*(I*d^3*f*x + I*c*d^2*f + (I*d^3*f*x + I*c*d^2*f)*cos(f*x + e))*dilog(-c os(f*x + e) + I*sin(f*x + e)) - 24*(-I*d^3*f*x - I*c*d^2*f + (-I*d^3*f*x - I*c*d^2*f)*cos(f*x + e))*dilog(-cos(f*x + e) - I*sin(f*x + e)) - 12*(d^3* f^2*x^2 + 2*c*d^2*f^2*x + c^2*d*f^2 + (d^3*f^2*x^2 + 2*c*d^2*f^2*x + c^2*d *f^2)*cos(f*x + e))*log(cos(f*x + e) + I*sin(f*x + e) + 1) - 12*(d^3*f^2*x ^2 + 2*c*d^2*f^2*x + c^2*d*f^2 + (d^3*f^2*x^2 + 2*c*d^2*f^2*x + c^2*d*f^2) *cos(f*x + e))*log(cos(f*x + e) - I*sin(f*x + e) + 1) - 24*(d^3*cos(f*x + e) + d^3)*polylog(3, -cos(f*x + e) + I*sin(f*x + e)) - 24*(d^3*cos(f*x + e ) + d^3)*polylog(3, -cos(f*x + e) - I*sin(f*x + e)) - 4*(d^3*f^3*x^3 + 3*c *d^2*f^3*x^2 + 3*c^2*d*f^3*x + c^3*f^3)*sin(f*x + e))/(a*f^4*cos(f*x + e) + a*f^4)
\[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {c^{3}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} x^{3}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} x^{2}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d x}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]
(Integral(c**3/(sec(e + f*x) + 1), x) + Integral(d**3*x**3/(sec(e + f*x) + 1), x) + Integral(3*c*d**2*x**2/(sec(e + f*x) + 1), x) + Integral(3*c**2* d*x/(sec(e + f*x) + 1), x))/a
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1285 vs. \(2 (135) = 270\).
Time = 0.46 (sec) , antiderivative size = 1285, normalized size of antiderivative = 8.45 \[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\text {Too large to display} \]
1/2*(6*c*d^2*e^2*(2*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/(a*f^2) - sin( f*x + e)/(a*f^2*(cos(f*x + e) + 1))) - 6*c^2*d*e*(2*arctan(sin(f*x + e)/(c os(f*x + e) + 1))/(a*f) - sin(f*x + e)/(a*f*(cos(f*x + e) + 1))) - 6*((f*x + e)^2*cos(f*x + e)^2 + (f*x + e)^2*sin(f*x + e)^2 + 2*(f*x + e)^2*cos(f* x + e) + (f*x + e)^2 - 2*(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1) - 4*(f*x + e)*sin(f*x + e))*c*d^2*e/(a*f^2*cos(f*x + e)^2 + a*f^2*sin(f*x + e)^2 + 2 *a*f^2*cos(f*x + e) + a*f^2) + 2*c^3*(2*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a - sin(f*x + e)/(a*(cos(f*x + e) + 1))) + 3*((f*x + e)^2*cos(f*x + e)^2 + (f*x + e)^2*sin(f*x + e)^2 + 2*(f*x + e)^2*cos(f*x + e) + (f*x + e) ^2 - 2*(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1) - 4*(f*x + e)*sin(f*x + e))* c^2*d/(a*f*cos(f*x + e)^2 + a*f*sin(f*x + e)^2 + 2*a*f*cos(f*x + e) + a*f) - 2*(I*(f*x + e)^4*d^3 + 6*I*(f*x + e)^2*d^3*e^2 - 4*I*(f*x + e)*d^3*e^3 - 8*d^3*e^3 - 4*(I*d^3*e - I*c*d^2*f)*(f*x + e)^3 + 24*((f*x + e)^2*d^3 + d^3*e^2 - 2*(d^3*e - c*d^2*f)*(f*x + e) + ((f*x + e)^2*d^3 + d^3*e^2 - 2*( d^3*e - c*d^2*f)*(f*x + e))*cos(f*x + e) - (-I*(f*x + e)^2*d^3 - I*d^3*e^2 + 2*(I*d^3*e - I*c*d^2*f)*(f*x + e))*sin(f*x + e))*arctan2(sin(f*x + e), cos(f*x + e) + 1) + (I*(f*x + e)^4*d^3 - 4*(I*d^3*e - I*c*d^2*f + 2*d^3)*( f*x + e)^3 - 6*(-I*d^3*e^2 - 4*d^3*e + 4*c*d^2*f)*(f*x + e)^2 - 4*(I*d^...
\[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\int { \frac {{\left (d x + c\right )}^{3}}{a \sec \left (f x + e\right ) + a} \,d x } \]
Timed out. \[ \int \frac {(c+d x)^3}{a+a \sec (e+f x)} \, dx=\int \frac {{\left (c+d\,x\right )}^3}{a+\frac {a}{\cos \left (e+f\,x\right )}} \,d x \]